home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Kant Generator Pro 1.2 / src / Shell ƒ / offscreen layer.h < prev    next >
Text File  |  1995-02-14  |  2KB  |  49 lines

  1. #ifndef __MY_OFFSCREEN_LAYER_H__
  2. #define __MY_OFFSCREEN_LAYER_H__
  3.  
  4. #include <QDOffscreen.h>
  5.  
  6. typedef struct
  7. {
  8.     GrafPtr            offscreenPtr;    /* cast to GWorldPtr if color */
  9.     PixMapHandle    pixMapHandle;    /* color only */
  10.     GWorldPtr        currentGWorld;    /* color only */
  11.     GDHandle        currentGDHandle;/* color only */
  12.     Ptr                bwBitMap;        /* B/W only */
  13.     GrafPort        bwGrafPort;        /* B/W only */
  14.     Boolean            isColor;        /* true if offscreenPtr is GWorldPtr & myPixMapHandle is valid */
  15. } MyOffscreenRec, *MyOffscreenPtr, **MyOffscreenHandle;
  16.  
  17. typedef struct
  18. {
  19.     WindowPtr        destWindow;
  20.     MyOffscreenRec    offscreenWorldRec;
  21.     MyOffscreenRec    patternWorldRec;
  22.     MyOffscreenRec    scratchWorldRec;
  23.     Rect            sourceRect;
  24.     Rect            destRect;
  25.     short            scrollSpeed;
  26.     short            scrollXPos;
  27.     short            font;
  28.     short            size;
  29.     unsigned long    offset;
  30.     Rect            scrollSourceRect;
  31.     Rect            scrollDestRect;
  32.     Handle            theText;
  33. } MyOffscreenComboRec, *MyOffscreenComboPtr, **MyOffscreenComboHandle;
  34.  
  35. MyOffscreenComboPtr AllocateOffscreenCombo(WindowPtr theWindow, Rect *sourceRect, Rect *destRect,
  36.     short scrollSpeed, Handle theText, short font, short size);
  37. OSErr AllocatePartialOffscreenWorld(WindowPtr theWindow, MyOffscreenPtr offscreenWorldPtr,
  38.     Rect *boundsRect, Boolean setPort, Boolean *depthChanged);
  39. OSErr AllocateOffscreenWorld(WindowPtr theWindow, MyOffscreenPtr offscreenWorldPtr,
  40.     Boolean *depthChanged);
  41. void CopybitsCombo(MyOffscreenComboPtr offscreenComboPtr);
  42. void ScrollTextCombo(MyOffscreenComboPtr offscreenComboPtr);
  43. void SetPortToOnscreenWindow(WindowPtr theWindow, MyOffscreenPtr offscreenWorldPtr);
  44. void SetPortToOffscreenWindow(MyOffscreenPtr offscreenWorldPtr);
  45. void DisposeOffscreenWorld(MyOffscreenPtr offscreenWorldPtr);
  46. MyOffscreenComboPtr DisposeOffscreenCombo(MyOffscreenComboPtr offscreenComboPtr);
  47.  
  48. #endif
  49.